.videoContainer {
  position: relative;
  width: 100%;
  max-width: 100vw;
  max-height: 100vh;
  background-color: #000;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 添加展位图样式 */
.video[poster] {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  padding: 24px 16px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(10px);
}

.videoContainer:hover .controls {
  opacity: 1;
  transform: translateY(0);
}

.button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: all 0.2s ease;
  border-radius: 50%;
}

.button:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.button:active {
  transform: scale(0.95);
}

.progress {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: height 0.2s ease;
}

.progress:hover {
  height: 6px;
}

.progressBar {
  height: 100%;
  background: var(--ifm-color-primary, #fff);
  border-radius: 4px;
  position: relative;
}

.progressBar::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--ifm-color-primary, #fff);
  border-radius: 50%;
  transform: translate(0, -50%) scale(0);
  transition: transform 0.2s ease;
}

.progress:hover .progressBar::after {
  transform: translate(0, -50%) scale(1);
}

.volumeContainer {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* 添加播放速度控制样式 */
.speedControl {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.speedButton {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: all 0.2s ease;
  border-radius: 4px;
  font-size: 14px;
  font-family: monospace;
  min-width: 48px;
}

.speedButton:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}

.speedOptions {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 4px;
  padding: 8px 0;
  margin-bottom: 8px;
  display: none;
  flex-direction: column;
  min-width: 100px;
  &::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 8px;
  }
}

.speedControl:hover .speedOptions,
.speedOptions:hover {
  display: flex;
}

.speedOption {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px 16px;
  text-align: left;
  opacity: 0.8;
  transition: all 0.2s ease;
  font-size: 14px;
  white-space: nowrap;
}

.speedOption:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}

.speedOption.active {
  opacity: 1;
  color: var(--ifm-color-primary, #fff);
}

.volumeSlider {
  width: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  transition: width 0.3s ease;
}

.volumeContainer:hover .volumeSlider {
  width: 80px;
}

.volumeBar {
  height: 100%;
  background: var(--ifm-color-primary, #fff);
  border-radius: 4px;
}

.fullscreen {
  margin-left: auto;
}

.time {
  color: white;
  font-size: 14px;
  font-family: monospace;
  min-width: 100px;
  text-align: center;
  user-select: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .videoContainer {
    border-radius: 0;
  }

  .controls {
    padding: 20px 12px 8px;
    gap: 12px;
  }

  .time {
    min-width: 80px;
    font-size: 12px;
  }

  .button {
    padding: 6px;
  }

  .button svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .controls {
    padding: 16px 8px 4px;
    gap: 8px;
  }

  .time {
    display: none;
  }

  .volumeContainer {
    display: none;
  }

  .speedControl {
    display: none;
  }
}

/* 全屏模式样式 */
.videoContainer:fullscreen {
  border-radius: 0;
  width: 100vw;
  height: 100vh;
}

.videoContainer:fullscreen .video {
  object-fit: contain;
} 